var GEM_EFFECT_DESCRIPTIONS_EXTREME = {
        101: "Boost life gain<br>*1+x",
        102: "Boost point gain<br>^1+x<sup>2</sup>",
        201: "Divide N → ΔP initial cost<br>10^cbrt(x)",
        202: "Reduce β → ∂𝛾 base cost<br>1e5^cbrt(x)",
        103: "Add to N → ΔN base<br>cbrt(x)/5",
        203: "Add to Constant base<br>log10(1+x)/200",
        301: "Add to Life Milestone 1 limit<br>⌊cbrt(x)⌋",
        302: "Add to all Life exponential dividers<br>cbrt(x)/3",
        303: "Less tokens for prestige<br>⌊log2(1+x)⌋",
        104: "Add to Amino effect exponent<br>sqrt(x)",
        204: "Life gain per non-0 gem<br>(x+1)^x<sup>.2</sup>",
        304: "Point gain per 𝛾 → ∂𝛾<br>log10(10+x)",
        401: "Passive Amino Acid gain<br>x%/s",
        402: "Add to base of base life gain<br>sqrt(x)",
        403: "Phosphorus gain<br>^min(10,<wbr>1.02<sup>x</sup>)",
        404: "Unlock Amino upgrades<br>⌊log3(<wbr>2+x<sup>1.5</sup>/3)⌋",
        105: "Protein gain<br>log10(10+x)<sup>2</sup>",
        205: "Passive gem gain when completeable<br>10*ln(1+x)%/s",
        305: "Protein Science gain<br>sqrt(1+x)",
        405: "tRNA is cheaper<br>10^cbrt(x)",
        501: "mRNA is cheaper<br>100^cbrt(x)",
        502: "Amino gain exp<br>cbrt(x)/2",
        503: "Protein per Amino Acid upgrade<br>log10(10+x<sup>.5</sup>)",
        504: "Point gain per siRNA<br>log10(10+x)",
        505: "Life gain per rRNA<br>1+x/300",
        106: "Add to shRNA base<br>cbrt(x)",
        206: "Multiply DNA gain<br>log10(10+x)<sup>3</sup>",
        306: "Passive DNA gain<br>x/11%/s",
        406: "Protein gain per DNA milestone<br>1+x",
        506: "Add to base DNA gain<br>x/100",
        601: "DNA gain per shRNA<br>1+x/1e4",
        602: "Gem gain<br>1+cbrt(x)",
        603: "Autobuy shRNA<br>x>1330",
        604: "Point gain per shRNA<br>1+x^2",
        605: "shRNA cost exponent is 1.8<br>x>1330",
        606: "DNA resets per second<br>cbrt(x)/11",
        107: "Point gain per snRNA<br>1+x<sup>1.8</sup>",
        207: "<bdi style='font-size: 80%'>Remove a log2 from α → ∂α and shRNA exponent is 1.7<br>x > 1330</bdi>",
        307: "Protein gain per 𝛾 → ∂𝛾<br>1+x",
        407: "\"Universe\" is universal<br>x>1330",
        507: "Add to DNA gain exponent<br>x/1000",
        607: "DNA gain per non-0 gem<br>(x+1)<sup>.25</sup>",
        701: "Bulk 2x Life buyables<br>x>1330",
        702: "Bulk more N → Δµ<br>round(1+<wbr>cbrt(x)*9/11)",
        703: "Protein Science per non-0 gem<br>1+x",
        704: "Phosphorus gain per miRNA<br>1+<wbr>log10(1+x)/500",
        705: "Add .0001 to tRNA base and unlock DNA Research<br>x>1330",
        706: "Subtract from Challenge 7 effect<br>cbrt(x)/2752",
        707: "Add .004 to Dilation effect<br>x>1330",
        108: "<bdi style='font-size: 80%'>Point gain per 𝛾 → ∂𝛾<sup>1.9394</sup> and DNA Science gain<br>1+x</bdi>",
        208: "mRNA base per non-zero gem-49 (maxed at 8)<br>x/2662000",
        308: "DNA Science per non-0 gem-48<br>log10(10+x)",
        408: "<bdi style='font-size: 60%'>Remove the /8e315 in DNA gain formula and gain 8.315 more DNA Science<br>x>1330</bdi>",
        508: "Customizable effect per non-0 gem-53<br>^1-cbrt(x)/100",
        608: "All µ cost reductions always work<br>x>1330",
        708: "Reduce µ cost exponent<br>x/26620",
        801: "Add to shRNA base per shRNA<br>x/13310",
        802: "Autobuy tokens<br>x>1330",
        803: "Autobuy Radio Waves<br>x>1330",
        804: "X-Rays effects Amino Acid<br>x>1330",
        805: "Phosphorus gain per non-zero gem<br>1+cbrt(x)",
        806: "Remove snRNA's ln<br>x>1330",
        807: "Life gain per N → Δµ<br>1+x/100",
        808: "Add .0001 to tRNA's base<br>x>1330",
}

var GEM_EFFECT_DESCRIPTIONS = {
        101: "Boost life gain<br>*1+sqrt(x)",
        102: "Boost point gain<br>^1+cbrt(x)",
        201: "Divide N → ΔP initial cost<br>10^cbrt(x)",
        202: "Add to α → ∂𝛾 base<br>log10(1+x)/10",
        103: "Add to N → ΔN base<br>sqrt(x)/10+<wbr>cbrt(x)/5",
        203: "Add to Constant base<br>log10(1+x)/200",
        301: "Boost point gain per non-0 gem count<br>ln(e+x)",
        302: "Add to β → ∂𝛾 base<br>log10(1+x)/10",
        303: "Less tokens for prestige<br>⌊log2<wbr>(log2(2+2x))⌋",
        104: "Add to Amino effect exponent<br>cbrt(x)",
        204: "Life gain per non-0 gem<br>(x+1)^<wbr>log100(100+x)",
        304: "Point gain per N → ΔP<br>log10(10+x<sup>.8</sup>)",
        401: "Passive Amino Acid gain<br>x%/s",
        402: "Add to base of base life gain<br>sqrt(x)", 
        403: "Phosphorus gain<br>^min(10,<wbr>1.02<sup>x</sup>)",
        404: "Unlock Amino upgrades<br>⌊log3(<wbr>2+x<sup>1.5</sup>/3)⌋",
        105: "Protein gain<br>log10(10+x)",
        205: "Passive gem gain when completeable<br>10*ln(1+x)%/s",
        305: "Amino Acid gain<br>sqrt(1+8*x)",
        405: "tRNA is cheaper<br>10^cbrt(x)",
        501: "mRNA is cheaper<br>100^cbrt(x)",
        502: "Amino gain exp<br>cbrt(x/10)",
        503: "Protein per Amino Acid upgrade<br>log10(10+x<sup>.5</sup>)",
        504: "Point gain per siRNA<br>log10(10+x)",
        505: "Life gain per rRNA<br>log100(100+x)",
        106: "Add to shRNA base<br>cbrt(x)/1.1",
        206: "Multiply DNA gain<br>log10(10+x)<sup>2</sup>",
        306: "Passive DNA gain<br>x/11%/s",
        406: "Protein gain per DNA milestone<br>1+x",
        506: "Add to base DNA gain<br>log2(1+x)",
        601: "DNA gain per shRNA<br>1+<wbr>log10(10+x)/50",
        602: "Gem gain<br>1+cbrt(x)",
        603: "Autobuy shRNA<br>x>1330",
        604: "Point gain per shRNA<br>1+x",
        605: "Point gain per α → ∂α<br>(1+x)^<wbr>log2(10+x)/4",
        606: "DNA resets per second<br>cbrt(x)/11",
        107: "Point gain per snRNA<br>1+x",
        207: "Remove a log2 from α → ∂α<br>x > 1330",
        307: "Protein gain per 𝛾 → ∂𝛾<br>1+x",
        407: "\"Universe\" is universal<br>x>1330",
        507: "Bulk 50x Life buyables<br>x>1330",
        607: "DNA gain per non-0 gem<br>log10(10+x)",
        701: "Remove the /2 in the DNA gain formula<br>x>1330",
        702: "Bulk more N → Δµ<br>round(1+<wbr>cbrt(x)*9/11)",
        703: "Point gain per rRNA<br>1+cbrt(x)",
        704: "Phosphorus gain per miRNA<br>1+<wbr>log10(1+x)/100",
        705: "Add .0001 to tRNA base<br>x>1330",
        706: "Subtract from Challenge 7 effect<br>cbrt(x)/2200",
        707: "Add .004 to Dilation effect<br>x>1330",
        108: "Point gain per 𝛾 → ∂𝛾<sup>1.8</sup><br>1+x",
        208: "mRNA base per non-zero gem-49 (maxed at 8)<br>x/2662000",
        308: "Point gain per β → ∂α<br>1+x^<wbr>log10(DNA)/100",
        408: "Remove the /4.4e144 in DNA gain formula<br>x>1330",
        508: "Customizable effect per non-0 gem-53<br>^1-cbrt(x)/97",
        608: "All µ cost reductions always work<br>x>1330",
        708: "Reduce µ cost exponent<br>x/26620",
        801: "Add to shRNA base per shRNA<br>x/13310",
        802: "Autobuy tokens<br>x>1330",
        803: "Autobuy Radio Waves<br>x>1330",
        804: "X-Rays effects Amino Acid<br>x>1330",
        805: "Phosphorus gain per non-zero gem<br>1+cbrt(x)",
        806: "Remove snRNA's ln<br>x>1330",
        807: "Life gain per N → Δµ<br>1+x/13",
        808: "Add .0006 to tRNA's base<br>x>1330",
}

var GEM_EFFECT_FORMULAS_EXTREME = {
        101: (x) => x.plus(1),
        102: (x) => x.pow(2).plus(1),
        201: (x) => x.cbrt().pow10(),
        202: (x) => new Decimal(1e5).pow(x.cbrt()),
        103: (x) => x.cbrt().div(5),
        203: (x) => x.plus(1).log10().div(200),
        301: (x) => Math.floor(Math.cbrt(x.toNumber())),
        302: (x) => x.cbrt().div(3),
        303: (x) => x.plus(1).log(2).floor(),
        104: (x) => x.sqrt(),
        204: (x) => x.plus(1).pow(x.pow(.2)),
        304: (x) => x.plus(10).log10(),
        401: (x) => x.div(100),
        402: (x) => x.sqrt(),
        403: (x) => Decimal.pow(1.02 + (hasChallenge("l", 51) && !hasMilestone("or", 14) ? 0.005 : 0), x).min(hasChallenge("l", 52) && !hasMilestone("or", 14) ? 1e100 : 10),
        404: (x) => x.pow(1.5).div(3).plus(2).log(3).floor(),
        105: (x) => x.plus(10).log10().pow(2),
        205: (x) => x.plus(1).ln().div(10).plus(hasUpgrade("d", 11) ? 1 : 0),
        305: (x) => x.plus(1).sqrt(),
        405: (x) => x.cbrt().pow10(),
        501: (x) => x.cbrt().pow10().pow(2),
        502: (x) => x.cbrt().div(2),
        503: (x) => x.sqrt().plus(10).log10(),
        504: (x) => x.plus(10).log10(),
        505: (x) => x.div(300).plus(1),
        106: (x) => x.cbrt(),
        206: (x) => x.plus(10).log10().pow(3),
        306: (x) => x.div(1100),
        406: (x) => x.plus(1),
        506: (x) => x.div(100),
        601: (x) => x.div(1e4).plus(1),
        602: (x) => x.cbrt().plus(1),
        603: (x) => x.gt(1330),
        604: (x) => x.pow(2).plus(1),
        605: (x) => x.gt(1330),
        606: (x) => x.cbrt().div(11),
        107: (x) => x.pow(1.8).plus(1),
        207: (x) => x.gt(1330),
        307: (x) => x.plus(1),
        407: (x) => x.gt(1330),
        507: (x) => x.div(1000),
        607: (x) => x.plus(1).pow(.25),
        701: (x) => x.gt(1330),
        702: (x) => x.cbrt().div(11).times(9).plus(1).round(),
        703: (x) => x.plus(1),
        704: (x) => hasUpgrade("cells", 64) ? new Decimal(1.04) : x.plus(1).log10().div(500).plus(1),
        705: (x) => x.gt(1330),
        706: (x) => x.cbrt().div(2752),
        707: (x) => x.gt(1330),
        108: (x) => x.plus(1),
        208: (x) => x.div(2662000),
        308: (x) => x.plus(10).log10(),
        408: (x) => x.gt(1330),
        508: (x) => Decimal.sub(1,x.cbrt().div(95)),
        608: (x) => x.gt(1330),
        708: (x) => x.div(26620),
        801: (x) => x.div(13310),
        802: (x) => x.gt(1330),
        803: (x) => x.gt(1330),
        804: (x) => x.gt(1330),
        805: (x) => x.cbrt().plus(1),
        806: (x) => x.gt(1330),
        807: (x) => x.div(100).plus(1),
        808: (x) => x.gt(1330),
}

var GEM_EFFECT_FORMULAS = {
        101: (x) => x.sqrt().plus(1),
        102: (x) => x.cbrt().plus(1),
        201: (x) => x.cbrt().pow10(),
        202: (x) => x.plus(1).log10().div(10),
        103: (x) => x.sqrt().div(10).plus(x.cbrt().div(5)),
        203: (x) => x.plus(1).log10().div(200),
        301: (x) => x.plus(Math.E).ln(),
        302: (x) => x.plus(1).log10().div(10),
        303: (x) => x.times(2).plus(2).log(2).log(2).floor(),
        104: (x) => x.cbrt(),
        204: (x) => x.plus(1).pow(x.plus(100).log(100).min(2)),
        304: (x) => x.pow(.8).plus(10).log10(),
        401: (x) => x.div(100),
        402: (x) => x.sqrt(),
        403: (x) => Decimal.pow(1.02 + (hasChallenge("l", 51) && !hasMilestone("or", 14) ? 0.005 : 0), x).min(hasChallenge("l", 52) && !hasMilestone("or", 14) ? 1e100 : 10),
        404: (x) => x.pow(1.5).div(3).plus(2).log(3).floor(),
        105: (x) => x.plus(10).log10(),
        205: (x) => x.plus(1).ln().div(10).plus(hasUpgrade("d", 11) ? 1 : 0),
        305: (x) => x.times(8).plus(1).sqrt(),
        405: (x) => x.cbrt().pow10(),
        501: (x) => x.cbrt().pow10().pow(2),
        502: (x) => x.div(10).cbrt(),
        503: (x) => x.sqrt().plus(10).log10(),
        504: (x) => x.plus(10).log10(),
        505: (x) => x.plus(100).log(100),
        106: (x) => x.cbrt().div(1.1),
        206: (x) => x.plus(10).log10().pow(2),
        306: (x) => x.div(1100),
        406: (x) => x.plus(1),
        506: (x) => x.plus(1).log(2),
        601: (x) => x.plus(10).log10().div(50).plus(1),
        602: (x) => x.cbrt().plus(1),
        603: (x) => x.gt(1330),
        604: (x) => x.plus(1),
        605: (x) => x.plus(1).pow(x.plus(10).log(16)),
        606: (x) => x.cbrt().div(11),
        107: (x) => x.plus(1),
        207: (x) => x.gt(1330),
        307: (x) => x.plus(1),
        407: (x) => x.gt(1330),
        507: (x) => x.gt(1330),
        607: (x) => x.plus(10).log10(),
        701: (x) => x.gt(1330),
        702: (x) => x.cbrt().div(11).times(9).plus(1).round(),
        703: (x) => x.cbrt().plus(1),
        704: (x) => hasUpgrade("cells", 64) ? new Decimal(1.04) : x.plus(1).log10().div(100).plus(1),
        705: (x) => x.gt(1330),
        706: (x) => x.cbrt().div(2200),
        707: (x) => x.gt(1330),
        108: (x) => x.plus(1),
        208: (x) => x.div(2662000),
        308: (x) => x.plus(1).pow(player.d.points.max(1).log10().div(100)),
        408: (x) => x.gt(1330),
        508: (x) => Decimal.sub(1,x.cbrt().div(97)),
        608: (x) => x.gt(1330),
        708: (x) => x.div(26620),
        801: (x) => x.div(13310),
        802: (x) => x.gt(1330),
        803: (x) => x.gt(1330),
        804: (x) => x.gt(1330),
        805: (x) => x.cbrt().plus(1),
        806: (x) => x.gt(1330),
        807: (x) => x.div(13).plus(1),
        808: (x) => x.gt(1330),
}

function getResetGemIDs(){
        if (!player.cells.unlocked) return (
                           ["101", "102", "103", "104", "105", "106", "107", "108", 
                            "201", "202", "203", "204", "205", "206", "207", "208", 
                            "301", "302", "303", "304", "305", "306", "307", "308", 
                            "401", "402", "403", "404", "405", "406", "407", "408", 
                            "501", "502", "503", "504", "505", "506", "507", "508", 
                            "601", "602", "603", "604", "605", "606", "607", "608", 
                            "701", "702", "703", "704", "705", "706", "707", "708", 
                            "801", "802", "803", "804", "805", "806", "807", "808"])
                            
        return             [                                   "106", "107", "108", 
                                                               "206", "207", "208", 
                                                               "306", "307", "308", 
                                                               "406", "407", "408", 
                                                               "506", "507", "508", 
                            "601", "602", "603", "604", "605", "606", "607", "608", 
                            "701", "702", "703", "704", "705", "706", "707", "708", 
                            "801", "802", "803", "804", "805", "806", "807", "808"].slice(player.cells.milestone2Best)
}

